package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.ProcInstancNoteDao;
import com.hera.process.config.service.ProcInstancNoteService;
import com.hera.process.workflow.domain.ProcInstancNote;

@Service("procinstancnoteservice")
public class ProcInstancNoteServiceImpl implements ProcInstancNoteService {

	static final Logger logger = Logger.getLogger(ProcInstancNoteService.class);
	
	@Autowired
	private ProcInstancNoteDao procinstancenotedao;
	
	@Override
	public ProcInstancNote findById(Long id) {
		
		return procinstancenotedao.findOne(id);
	}

	@Override
	public void update(ProcInstancNote entity) {
		
		procinstancenotedao.save(entity);
	}

	@Override
	public void save(ProcInstancNote entity) {
		
		procinstancenotedao.save(entity);
	}

	@Override
	public void delete(ProcInstancNote entity) {
		
		procinstancenotedao.delete(entity);
	}

	@Override
	public List<ProcInstancNote> findAll() {
		
		return procinstancenotedao.findAll();
	}

	@Override
	public List<ProcInstancNote> findAll(FiltroDTO filtroDTO) {
		
		return procinstancenotedao.obtenerEntidadesPorFiltros(filtroDTO);
	}
}
